Fix ioemu compile on Solaris
authorKeir Fraser <keir@xensource.com>
Tue, 2 Oct 2007 08:29:23 +0000 (09:29 +0100)
committerKeir Fraser <keir@xensource.com>
Tue, 2 Oct 2007 08:29:23 +0000 (09:29 +0100)
Solaris doesn't have RLIMIT_RSS at least; don't try to set rlimits.
Signed-off-by: John Levon <john.levon@sun.com>
tools/ioemu/vl.c

index 369769090a8a97443411294e8d9870e1b2fc49b2..f334020768f84279e99143eea1b8461c83387eb9 100644 (file)
@@ -7102,6 +7102,7 @@ int main(int argc, char **argv)
     char qemu_dm_logfilename[128];
     const char *direct_pci = NULL;
 
+#ifndef __sun__
     /* Maximise rlimits. Needed where default constraints are tight (*BSD). */
     if (getrlimit(RLIMIT_STACK, &rl) != 0) {
        perror("getrlimit(RLIMIT_STACK)");
@@ -7125,6 +7126,7 @@ int main(int argc, char **argv)
     rl.rlim_max = RLIM_INFINITY;
     if (setrlimit(RLIMIT_MEMLOCK, &rl) != 0)
        perror("setrlimit(RLIMIT_MEMLOCK)");
+#endif
 
     /* Ensure that SIGUSR2 is blocked by default when a new thread is created,
        then only the threads that use the signal unblock it -- this fixes a